package com.rcloud.server.sealtalk.domain;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import java.math.BigDecimal;
import java.util.Date;

/**
    * 用户支付订单表
    */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "pay_order")
public class PayOrder {
    /**
     * 主键ID
     */
    @Id
    @Column(name = "id")
    @GeneratedValue(generator = "JDBC")
    private Integer id;

    /**
     * 用户ID
     */
    @Column(name = "user_id")
    private Integer userId;

    /**
     * 商户网站唯一订单号
     */
    @Column(name = "out_trade_no")
    private String outTradeNo;

    /**
     * 支付类型 1.微信 2.支付宝
     */
    @Column(name = "pay_type")
    private Integer payType;

    /**
     * 支付回调的状态 0 未支付 1 已支付
     */
    @Column(name = "trade_status")
    private Integer tradeStatus;

    /**
     * 支付的金额
     */
    @Column(name = "trade_amount")
    private BigDecimal tradeAmount;

    /**
     * 支付时间
     */
    @Column(name = "create_time")
    private Date createTime;

    /**
     * 更新的时间
     */
    @Column(name = "update_time")
    private Date updateTime;

    /**
     * 业务类型 1:认证费用
     */
    @Column(name = "busi_type")
    private Integer busiType;

    /**
     * 版本号
     */
    @Column(name = "version")
    private Integer version;
}